home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 37 / CD Expert nº 37.iso / LastCall / lastcall.exe / stuff / recipe.dxr / 00029_Help index on left hs.ls < prev    next >
Encoding:
Text File  |  2000-03-23  |  1.5 KB  |  67 lines

  1. property pSpr, pText, pLastLine, pHilightArrow, pSolidArrow, pLineHeight
  2.  
  3. on beginSprite me
  4.   global gUserTips
  5.   pSpr = sprite(me.spriteNum)
  6.   pSolidArrow = sprite(me.spriteNum + 1)
  7.   pHilightArrow = sprite(me.spriteNum + 2)
  8.   temp = EMPTY
  9.   repeat with X = 1 to count(gUserTips)
  10.     temp = temp & gUserTips[X][#tipName] & RETURN
  11.   end repeat
  12.   delete char -30000 of temp
  13.   customFont(pSpr.member)
  14.   if isText(pSpr) then
  15.     pSpr.member.text = temp
  16.     pText = pSpr.member.text
  17.     pLineHeight = charPosToLoc(pSpr.member, 1).locV + 1
  18.     mouseLeave(me)
  19.   end if
  20. end
  21.  
  22. on mouseLeave me
  23.   if isText(pSpr) then
  24.     pLastLine = VOID
  25.     pSpr.member.color = black()
  26.     pHilightArrow.locV = -50
  27.   end if
  28. end
  29.  
  30. on mouseWithin me
  31.   if paused() then
  32.     exit
  33.   end if
  34.   thisLine = PointToLine(pSpr, the mouseLoc)
  35.   if thisLine = pLastLine then
  36.     exit
  37.   end if
  38.   if thisLine > 0 then
  39.     if not voidp(pLastLine) then
  40.       pSpr.member.line[pLastLine].color = black()
  41.     end if
  42.     pLastLine = thisLine
  43.     pSpr.member.line[thisLine].color = red()
  44.     pHilightArrow.locV = currentLineLoc(me, thisLine)
  45.   end if
  46. end
  47.  
  48. on mouseDown me
  49.   if paused() then
  50.     exit
  51.   end if
  52.   if voidp(pLastLine) then
  53.     pLastLine = PointToLine(pSpr, the mouseLoc)
  54.   end if
  55.   if not voidp(pLastLine) then
  56.     if customHelpTopic(pLastLine, 1) then
  57.       pSolidArrow.locV = currentLineLoc(me, pLastLine)
  58.     end if
  59.   end if
  60. end
  61.  
  62. on currentLineLoc me, thisLine
  63.   pSpr = sprite(me.spriteNum)
  64.   pLineHeight = charPosToLoc(pSpr.member, 1).locV + 1
  65.   return pSpr.locV + ((thisLine - 1) * pLineHeight)
  66. end
  67.